package tuling.EalyAopDemo;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import tuling.Calculate;

/**
 * Created by xsls on 2019/6/10.
 */
public class TulingMainClass {

    public static void main(String[] args) {

        // AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(EalyAopMainConfig.class);
        // Calculate tulingCalculate = ctx.getBean("tulingCalculate",Calculate.class);
		// System.out.println("结果: " + tulingCalculate.div(1, 1));

        /*ProxyFactoryBean*/
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(EalyAopMainConfig.class);
        Calculate calculateProxy = ctx.getBean("tulingCalculate",Calculate.class);
        System.out.println(calculateProxy.getClass());
        calculateProxy.div(1,1);

    }
}
